Dynomotion

Group: DynoMotion Message: 541 From: ekonradsson Date: 7/28/2010
Subject: Coordinated motion and multible C files
How would I program KFLOP to do coordinated moves, ie. move from one point in an x,y plane to another in a straight line? I Currently I am using Move commands but they move each axis independently.

Also, how can I link other c files to the program when its compiled. I have several functions I want to reuse in different programs but I don't want to use copy the source code each time.

Thanks
EK
Group: DynoMotion Message: 542 From: Tom Kerekes Date: 7/28/2010
Subject: Re: Coordinated motion and multible C files
EK,
 
Coordinated motion (multi-axis along a straight line or path) is somewhat difficult from a C program as this is normally handled by the Trajectory Planner that runs on the PC.  You would need to place "motion segments" in the Coordinated Motion Buffer and define how to accelerate along the path using a 3rd order parametric equation.  See:
 
 
A simple straight line, single segment, constant velocity, 6 axes motion, from (10,10,10,10,10,10), to (20,20,20,20,20,20) over 40ms, using the console would be:
 
OpenBuf
Linear 10 10 10 10 10 10 20 20 20 20 20 20 0 0 25 0 0.04
ExecBuf
 
 
Maybe you could describe a bit more what you need to do.  There may be a simpler solution.  For example for a simple point to point straight line if you use the Independent Move commands, but scale the Max Vel, Accel, and Jerk proportionately to the distance each axis is to move, you should get a linear motion result.
Regarding linking C programs:  we don't have a means of linking c modules.  You could put the common code in a separate file and include the routines using a #include "c:\myfiles\foo.c"  statement.
 
Regards
TK